package com.twu.biblioteca;

import Model.Book;
import Persistance.BookList;
import Persistance.MovieList;

public class Message {

    public static void printReservationStatus(Book book){
        if(book != null)
            System.out.println("Thank You! Enjoy the book.");
        else
            System.out.println("Sorry we don't have that book yet.");
    }

    public static void printWelcomeMessage(){
        System.out.println("Welcome to Biblioteca -- (access with -> 111-1111 : password1) ");
    }

    public static void printBookListHead(){
        System.out.println("The Following are the books owned by the Library:");
        System.out.println("ID\tName\t\t Status");
        System.out.println("--------------------------------------");
    }

    public static void printMovieListHead(){
        System.out.println("The Following are the movies owned by the Library:");
        System.out.println("ID \t\t\tMovie\t\t\t\t|\tYear\t|\t\t\tDirector\t\t|\tRating");
        System.out.println(String.format("%-90s", "-").replace(' ', '-'));
    }

    public static void printMenu(){
        System.out.println("######################################");
        System.out.println("# 1: View a list of all the books.   #");
        System.out.println("# 2: View a list of all the movies.  #");
        System.out.println("# 3: Check their membership details. #");
        System.out.println("# 4: Reserve a book.                 #");
        System.out.println("# 5: Exit.                           #");
        System.out.println("######################################");
    }

    public static void printTalktoLibrarian(){
        System.out.println("Please talk to a Librarian. Thank you.");
    }

    public static void printInvalidUserName(){
        System.out.println("Invalid Username !");
    }

    public static void printInvalidUserNameAndPass(){
        System.out.println("Invalid Username & Password !");
    }

    public static void printMovieList(MovieList movieList){
        Message.printMovieListHead();
        for(int index=0; index<movieList.size();index++){
            System.out.println(index + ":\t" + movieList.get(index).getString());
        }
        System.out.println();
    }

    public static void printBookList(BookList bookList){
        Message.printBookListHead();
        for(int index=0; index<bookList.size();index++){
            System.out.println(index + ":\t" + bookList.toString(index));
        }
        System.out.println();
    }



}
